home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1987 March
/
Ahoy_Magazine_87-03_1987_Double_L.d64
/
Lights Out
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
8KB
|
198 lines
4 rem"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]
5 [143]"(NULL) lights out! (NULL)
6 rem"[221] by walter e. meyers [221]
7 [143]"(NULL) 403 carriage lane (NULL)
8 rem"[221] cary, n.c. 27511 [221]
9 [143]"/tantantantantantantantantantantantantantantantantantantantantantantantantantantantantantanexp
10 goto 600
20 poke 198,0:wait 198,1:ii=peek(631):poke 198,0:return
30 poke s+5,136:poke s+6,240:poke s+1,20:poke s+4,33:return
40 poke sc,11:poke bo,11:print"[147]";:for i=0to22:print" [144]" m$(i):next:return
50 poke 781,l(r):poke 782,c(r):poke 783,0:sys 65520:print li$(l):li(r)=l
60 poke lc+r,l:return
70 for cl=s to s+24:poke cl,0:next:poke s+24,15:return
80 poke s+6,240:poke s+1,40:poke s+4,17:for t=1to3:next:poke s+4,16:return
90 poke 781,ln:poke 782,co:poke 783,0:sys 65520:return
99 :
100 sc=53281:bo=53280:bn=56576:lc=49244:v=53248:poke v+21,0:s=54272:gosub 70
110 p0=300:fori=0to9:read c(i),l(i),ho(i),ve(i),vs(i):li(i)=0:next:poke 785,104
120 poke786,192:fori=1to5:read gh(i):next:for i=0to7:read a:poke 52216+i,a:next
130 for i=39to46:read a:poke v+i,a:next:for i=4to16:read a:poke v+i,a:next
140 for i=49256to49275:read a:poke i,a:next:poke v+23,1:poke v+27,2:poke v+29,0
150 gs=15:gm=1:poke v+21,4:gosub 500:tm=ti
160 k=1:gr(0)=0:gc=1:pr=0:g=0
170 n=int(rnd(1)*9+1):gr(k)=n:for i=0tok-1:if gr(k)=gr(i)then 170
180 next:k=k+1:if k<10 then 170
190 poke v,ho(pr):poke v+1,ve(pr):poke v+16,vs(pr):poke lc,1:poke v+21,5
199 :
200 joy=peek(56320)and15:fire=peek(56320)and16
210 if joy=11 then if pr<>3andpr<>6andpr<>9 then pr=pr+1:poke 52216,4:goto 260
220 if joy=14 then if pr<7 then pr=pr+3:goto 260
230 if joy=13 then if pr>3 then pr=pr-3:goto 260
240 if joy=7 then if pr<>7andpr<>4andpr<>1 then pr=pr-1:poke 52216,3:goto 260
250 if fire=0 then if pr>0 then r=pr:l=1:gosub 50:gosub 80
260 win=usr(0):if win=1 then poke v+21,5:goto 400
270 gosub 300:for t=1to40:next:poke v,ho(pr):poke v+1,ve(pr):poke v+16,vs(pr)
280 goto 200
299 :
300 gc=gc+1:if gc<gs then return
310 gc=1:g=g+1:if g=10 then g=1
320 poke v+2,ho(gr(g)):poke v+3,ve(gr(g))+14:poke v+21,7:r=gr(g)
330 l=0:gosub 50:gosub 30:return
399 :
400 gm=gm+1:if gm>5 then 430
410 gs=gs-2:poke v+40,gh(gm):poke sc,gh(gm):poke bo,gh(gm):for i=1to10:next
420 poke sc,11:poke bo,11:l=0:for r=1to9:gosub 50:next:goto 160
429 :
430 p1=(ti-tm)/60:p2=int(p1/60):p3=int(p1-(p2*60)):ln=21:co=5:gosub 90
440 poke 52216,5:print"your time:" p2 "min.," p3 "sec.":if p1<p0 then p0=p1
450 b2=int(p0/60):b3=int(p0-(b2*60)):ln=22:co=5:gosub 90:print"best time:";
460 print b2 "min.," b3 "sec.":ln=23:co=2:gosub 90:print"hit q to quit, ";
470 print"any other key to play.":gosub 20:poke v+21,0:if ii=81 then 490
480 goto 150
490 poke 648,4:poke 53272,21:poke bn,199:poke sc,6:poke bo,14:print"[147][154]":end
499 :
500 print"[147]":poke bn,peek(bn)and 252:poke 648,200:gosub 40:poke v+24,44
510 for t=1to2000:next:r=9:l=0:poke s+5,6:poke s+6,255:poke s+4,23:vo=15
520 fork=1to5:f1=20:poke s+24,2:f1=20:poke s+24,2:for j=1to6:poke s+24,vo:f2=20
530 poke s+1,f1:for i=1to4:poke s+15,f2:f2=f2*1.02:next:f1=f1*1.2:vo=vo-2:next
540 gosub 50:poke v+21,6:poke v+2,ho(r):poke v+3,ve(r)+14:r=r-1:poke s+24,15
550 for j=1to8:f2=20:poke s+1,f1:for i=1to3:poke s+15,f2:f2=f2/1.2:next
570 f1=f1/1.5:next:vo=15:if r>0thengosub50:pokev+2,ho(r):pokev+3,ve(r)+14:r=r-1
580 next:poke s+6,15:gosub 70:poke v+21,254:for k=1to30:for j=6to14step2
590 poke v+j,int(rnd(1)*(255-40)+40):poke v+j+1,int(rnd(1)*(200-50)+50)
595 next:next:poke v+21,4:poke 52216,4:return
600 poke 53281,15:print"[147][144] insert a joystick in port two. hit any "
610 printtab(12)"key when ready.":gosub 20
620 j=56334:for i=49152to49184:read a:poke i,a:next:poke j,peek(j)and 254
630 poke 1,peek(1)and 251:sys 49152:poke 1,peek(1)or 4:poke j,peek(j)or 1
640 read a:if a=-1 then 660
650 for i=0to7:read b:poke 61440+a*8+i,b:next:goto 640
660 for i=0to319:read a:poke 49344+i,a:next
699 :
700 dim m$(23),in$(4):m$(0)="[157][][][][][][][][][][][][][][][]":m$(2)=m$(0)
710 m$(1)="[157]][][][][][][][][][][][][][][]["
720 m$(3)="[144][201][202][193][194][195][196][197][198][202][202][202][193][194][195][196][197][198][202][202][202][193][194][195][196][197][198][202][203]"
730 m$(4)="[201][202][199][158] [162] [144][200][202][202][202][199][158] [172][187] [144][200][202][202][202][199][158][172][162][162][187][144][200][202][203]"
740 m$(5)="[201][202][199][158] @ [144][200][202][202][202][199][158] [146][161][161] [144][200][202][202][202][199][158][146][161][161][188][190][144][200][202][203]"
750 m$(6)="[201][202][199][158] @ [144][200][202][202][202][199][158] [146][161][161] [144][200][202][202][202][199][158][146][161][161][146][187][161][144][200][202][203]"
760 m$(7)="[201][202][199][158] [146][162][162] [144][200][202][202][202][199][158] [188][190] [144][200][202][202][202][199][158][188][146][162][162][190][144][200][202][203]"
770 m$(8)="[201][202][208][209][209][209][209][210][201][202][203][208][209][209][209][209][210][201][202][203][208][209][209][209][209][210][202][203]":m$(9)=m$(3)
780 m$(10)="[201][202][199][158][172][187][172][187][144][200][202][202][202][199][158][172][162][162][187][144][200][202][202][202][199][158][172][162][162][187][144][200][202][203]"
790 m$(11)="[201][202][199][158][146][161][188][190][161][144][200][202][202][202][199][158] [146][161][161] [144][200][202][202][202][199][158][146][161][188][162][187][144][200][202][203]"
800 m$(12)="[201][202][199][158][146][161][161][146][161][161][144][200][202][202][202][199][158] [146][161][161] [144][200][202][202][202][199][158] [146][161][161][144][200][202][203]"
810 m$(13)="[201][202][199][158][188][190][188][190][144][200][202][202][202][199][158] [188][190] [144][200][202][202][202][199][158][188][146][162][162][190][144][200][202][203]"
820 m$(14)="[201][202][208][209][209][209][209][210][201][202][203][208][209][209][209][209][210][201][202][203][208][209][209][209][209][210][202][203][][][][]"
830 m$(15)="[144][201][202][193][194][195][196][197][198][202][202][202][193][194][195][196][197][198][202][202][202][193][194][195][196][197][198][202][203]][][][]["
840 m$(16)="[201][202][199][158][172][162][162][187][144][200][202][202][202][199][158][172][187][172][187][144][200][202][202][202][199][158][172][162][162][187][144][200][202][203][213][214][146] [215][216][200]"
850 m$(17)="[201][202][199][158][146][161][161][146][161][161][144][200][202][202][202][199][158][146][161][161][146][161][161][144][200][202][202][202][199][158] [146][161][161] [144][200][202][203][146] [200]"
860 m$(18)=m$(17):m$(19)="[201][202][199][158][188][146][162][162][190][144][200][202][202][202][199][158][188][146][162][162][190][144][200][202][202][202][199][158] [188][190] [144][200][202][203][146] [200]"
870 m$(20)=m$(8)+"[211][211][211][211][211][211][200]":m$(21)="[201][202][202][202][202][202][202][202][202][202][202][202][202][202][202][202][202][202][202][202][202][202][202][202][202][202][202][203][212][212][212][212][212][212][200]"
880 m$(22)="[201][202][202][202][202][202][202][202][202][202][202][202][202][202][202][202][202][202][202][202][202][202][202][202][202][202][202][203]"+" [184]"
890 l$="[][][157][157][157][157]<><>[157][157][157][157][][][157][157][157][157]<><>":li$(0)="[146][144]"+l$:li$(1)="[158]"+l$:goto100
899 :
900 data 169,0,133,251,133,253,169,208,133,252,169,240,133,254,162,16,160
901 data 0,177,251,145,253,136,208,249,230,252,230,254,202,208,240,96
907 :
1000 data 0,255,255,255,255,255,255,255,255
1001 data 27,255,128,128,128,128,128,128,128
1002 data 29,255,1,1,1,1,1,1,1
1003 data 60,128,128,128,128,128,128,128,128
1004 data 62,1,1,1,1,1,1,1,1
1005 data 128,0,0,0,0,0,0,0,0
1006 data 155,0,127,127,127,127,127,127,127
1007 data 157,0,254,254,254,254,254,254,254
1008 data 158,255,231,195,129,231,231,231,103
1009 data 188,127,127,127,127,127,127,127,127
1010 data 190,254,254,254,254,254,254,254,254
1011 data 193,0,255,14,240,199,159,62,0
1012 data 194,15,240,7,254,252,0,127,0
1013 data 195,128,60,249,3,243,121,28,0
1014 data 196,1,60,159,192,207,158,56,0
1015 data 197,240,15,224,127,63,0,254,0
1016 data 198,0,255,112,15,227,249,124,0
1017 data 199,140,206,134,150,146,154,152,156
1018 data 200,49,115,97,105,73,89,25,57
1019 data 201,0,127,0,255,255,255,255,255
1020 data 202,0,255,0,255,255,255,255,255
1021 data 203,0,254,0,255,255,255,255,255
1022 data 208,0,63,159,192,255,255,255,255
1023 data 209,0,255,255,0,255,255,255,255
1024 data 210,0,252,249,3,255,255,255,255
1025 data 211,255,255,255,60,60,24,60,60
1026 data 212,126,126,126,60,60,24,60,255
1027 data 213,255,135,156,176,224,240,240,224
1028 data 214,254,128,0,0,0,0,0,0
1029 data 215,127,1,0,0,0,0,0,0
1030 data 216,255,225,57,13,7,15,15,7
1031 data -1
1099 :
1100 data 0,0,0,0,0,0,0,0,0
1101 data 0,0,0,0,0,0,0,0,0
1102 data 0,0,0,0,0,0,0,0,0
1103 data 0,0,0,1,255,192,3,255,224
1104 data 3,255,240,1,255,192,1,254,0
1105 data 7,255,192,15,255,224,15,255,240
1106 data 15,255,240,7,255,240,3,255,224,0
1109 :
1110 data 0,0,0,0,0,0,0,0,0
1111 data 0,0,0,0,0,0,0,0,0
1112 data 0,0,0,0,0,0,0,0,0
1113 data 0,0,0,3,255,128,7,255,192
1114 data 15,255,192,3,255,128,0,127,128
1115 data 3,255,224,7,255,240,15,255,240
1116 data 15,255,240,15,255,224,7,255,192,0
1119 :
1120 data 0,0,0,0,0,0,0,0,0
1121 data 0,0,0,0,0,0,0,254,0
1122 data 1,255,0,15,165,240,62,0,124
1123 data 120,0,30,248,255,31,249,255,159
1124 data 253,255,191,124,255,62,62,126,124
1125 data 63,255,252,31,255,248,15,255,240
1126 data 15,255,240,15,255,240,7,255,224,0
1129 :
1130 data 0,126,0,1,255,128,7,255,224
1131 data 15,255,240,28,24,56,30,24,120
1132 data 31,153,248,25,255,152,28,126,56
1133 data 30,0,120,31,0,248,15,129,240
1134 data 15,231,240,7,255,224,7,255,224
1135 data 3,255,192,3,255,192,1,255,128
1136 data 0,255,0,0,126,0,0,24,0,0
1139 :
1140 data 1,255,128,7,255,224,31,255,248
1141 data 63,255,252,127,255,254,127,255,254
1142 data 255,255,255,255,255,255,255,255,255
1143 data 255,255,255,255,255,255,127,255,254
1144 data 127,255,254,63,255,252,31,255,248
1145 data 7,255,224,1,255,128,0,0,0
1146 data 0,0,0,0,0,0,0,0,0,0
1199 :
1200 data 30,16,16,169,5, 23,16,213,169,4, 14,16,140,169,4, 5,16,67,169,4
1201 data 23,10,213,121,4, 14,10,140,121,4, 5,10,67,121,4, 23,4,213,73,4
1202 data 14,4,140,73,4, 5,4,67,73,4
1209 :
1210 data 3,10,13,14,1,6,6,7,6,6,6,6,6,0,3,15,8,10,14,13,7
1219 :
1220 data 60,65,12,65,60,60,140,121,140,121,140,121,4
1229 :
1230 data 160,0,185,93,192,240,12,200,192,9,208,246,160,1,169,0,108,5,0,96
4999 :
5000 cc=0:for i=49152to49184:read a:cc=cc+a:next
5010 if cc<>5966 then print"error in lines 900-901":stop
5020 print"font loader ok":cc=0
5030 read a:cc=cc+a:if a=-1 then 5050
5040 goto 5030
5050 if cc<>37856 then print"error in lines 1000-1031":stop
5060 print"character data ok":for i=0to4:cc(i)=0:next
5070 cs(0)=5083:cs(1)=4895:cs(2)=7035:cs(3)=6822:cs(4)=10317
5080 for j=0to4:for i=0to63
5090 read a:cc(j)=cc(j)+a:next
5100 next:for i=0to4
5110 if cc(i)<>cs(i) then print"error in lines"1100+i*10"to"1106+i*10:stop
5120 print"sprite"i+1"ok"
5130 next:cc=0
5140 for i=1to104
5150 read a:cc=cc+a
5160 next:if cc<>6382 then print"error in lines 1200-1230":stop
5170 print"all data ok"